package com.weipai.education.mapper;

import com.weipai.education.model.Product;
import com.weipai.education.model.PurchaseDetail;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface ProductMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Product record);

    Product listNumber(String name);

    int insertSelective(Product record);

    int insertNumber(Integer record);

    Product selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Product record);

    int updateByPrimaryKey(Product record);

    List<Map<String,Object>> list(@Param("start") Integer start, @Param("end") Integer size, 
                                  @Param("key") Integer key, @Param("productCateId") String productCateId);

    Integer listAmount(@Param("key") Integer key, @Param("productCateId") String productCateId);

    Map<String,Object> getProductInfo(String productId);

    List<Map<String,Object>> listNumber(@Param("spuNumber") String  spuNumber, @Param("name") String  name);

    List<Map<String,Object>> getProductBySpuNumber(String spuNumber);


    int insert(Integer productNumber);

    PurchaseDetail getProductById(String productName);
}